#foo = [2, 18, 9, 22, 17, 24, 8, 12, 27]
#print filter(lambda x: x % 3 == 0, foo)
#[18, 9, 24, 12, 27]
def filter(foo):
    for x in foo:
        if x % 3 ==0:
            print(x,end=" ")
    return

foo = [2, 18, 9, 22, 17, 24, 8, 12, 27]
filter(foo)


########################
#foo = [2, 18, 9, 22, 17, 24, 8, 12, 27]
#print map(lambda x: x * 2 + 10, foo)
#[14, 46, 28, 54, 44, 58, 26, 34, 64]
def map(foo):
    for x in foo:
        print(x*2+10,end=" ")
    return

foo = [2, 18, 9, 22, 17, 24, 8, 12, 27]
map(foo)